package cn.zhaozhiqi.article.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ArticleType {
    private Long id;
    private String typeName;
    private Integer status;
    //创建时间
//当前字段转换成Json格式数据时格式化,格式pattern=年[year]-月[month]-日[day]
    //timezone时区,中国在时间标准时间GMT的东八区,也叫+8区
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date updateTime;
    private Long parentId;
    //接收每个数据中父亲的typeName，可以通过sql语句，取别名进行查找
    private String parentTypeName;

}
